var Mock = require('mockjs')
const arr = ['未支付', '已完成', '已关闭']

// 精品课程
Mock.mock('/mock/api/order', 'get', function () {
  const data = Mock.mock({
    'list|6': [
      {
        id: '@guid',
        title: 'UI设计全进阶教程(名师课程)',
        'price|500-900': 0,
        'originPrice|1000-2000': 0,
        image: require('./images/banner.png'),
        // image: '@image(375x150,@color)',
        'theOrderNumber|+1': '12157774550',
        'status|1': arr,
      },
    ],
    total: 10,
    nextIndex: 10,
    isEnd: false,
  })
  const noPay = Mock.mock({
    'list|3': [
      {
        id: '@guid',
        title: 'UI设计全进阶教程(名师课程)',
        'price|500-900': 0,
        'originPrice|1000-2000': 0,
        image: require('./images/banner.png'),
        // image: '@image(375x150,@color)',
        'theOrderNumber|+1': '12157774550',
        status: '待支付',
      },
    ],
    total: 10,
    nextIndex: 10,
    isEnd: false,
  })
  const finish = Mock.mock({
    'list|2': [
      {
        id: '@guid',
        title: 'UI设计全进阶教程(名师课程)',
        'price|500-900': 0,
        'originPrice|1000-2000': 0,
        image: require('./images/banner.png'),
        // image: '@image(375x150,@color)',
        'theOrderNumber|+1': '12157774550',
        status: '已完成',
      },
    ],
    total: 10,
    nextIndex: 10,
    isEnd: false,
  })
  const close = Mock.mock({
    'list|2': [
      {
        id: '@guid',
        title: 'UI设计全进阶教程(名师课程)',
        'price|500-900': 0,
        'originPrice|1000-2000': 0,
        image: require('./images/banner.png'),
        // image: '@image(375x150,@color)',
        'theOrderNumber|+1': '12157774550',
        status: '已关闭',
      },
    ],
    total: 10,
    nextIndex: 10,
    isEnd: false,
  })
  return {
    code: 200,
    data,
    noPay,
    finish,
    close,
  }
})
